﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WcfContrib.Client
{
    /// <summary>
    /// Represents management options for communication channels
    /// </summary>
    [Flags]
    public enum ChannelManageOptions
    {
        /// <summary>
        /// No management
        /// </summary>
        None = 1,
        /// <summary>
        /// Closes the communication channel asynchronously after invoking O/W operations
        /// </summary>
        CloseAsyncAfterOneWay = 2,
        /// <summary>
        /// Renews faulted communication channel
        /// </summary>
        RenewFaultedChannel = 4,
        /// <summary>
        /// Assigns a dedicated communication channel for each asynchrnous call
        /// </summary>
        AsyncOwnChannel = 8,
        /// <summary>
        /// Assigns a dedicated communication channel for each call
        /// </summary>
        ChannelPerCall = 16,
        /// <summary>
        /// Assigns a dedicated communication channel for each call and closes channel asynchronously after invoking O/W operations
        /// </summary>
        SingleCall = CloseAsyncAfterOneWay | ChannelPerCall,
        /// <summary>
        /// Closes the communication channel asynchronously after invoking O/W operations and renews faulted channels
        /// </summary>
        Sequential = CloseAsyncAfterOneWay | RenewFaultedChannel,
        /// <summary>
        /// Aborts the communication channel after invoking O/W operations, renews faulted channels and creates a dedicated channel for each asynchrnous call
        /// </summary>
        SequentialAsyncOwnChannel = Sequential | AsyncOwnChannel
    }
}
